package com.masadora.service;

import java.util.HashMap;
import java.util.List;  
import java.util.Map;

import org.directwebremoting.annotations.RemoteMethod;  
import org.directwebremoting.annotations.RemoteProxy;  
import org.directwebremoting.spring.SpringCreator;  
import org.springframework.beans.factory.annotation.Autowired;  
  
import com.masadora.modal.ibatis.Month;  
  
@RemoteProxy(creator=SpringCreator.class)  
public class TestDwrService {  
      
    @Autowired  
    private MonthService monthService;  
      
    @RemoteMethod  
    public List<Month> test(){  
        List<Month> months = monthService.findIMonths();  
        return months;  
    }  
      
    @RemoteMethod  
	public Map<String, Month> testMap(){
		Map<String, Month> map = new HashMap<String, Month>();
		Month month = new Month();
		month.setName("公款吃喝");
		month.setTotal("12345");
		map.put("新闻", month);
		return map;
	}
	
} 
